package com.raymond.thread;

import com.raymond.bean.Message;
import com.raymond.redis.RedisConsumer;
import com.raymond.redis.RedisProducer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;
import java.util.concurrent.CountDownLatch;

/**
 * java类作用描述
 *
 * @author :  raymond
 * @version :  1.0
 * @date :  2019/7/17
 */
@Slf4j
public class RedisProducesThread extends Thread {

    private RedisProducer redisProducer;

    private String key;

    private String[] value;
    @Override
    public void run() {
        redisProducer.producers(key, value);
        log.info("已存入");
    }

    public RedisProducesThread(RedisProducer redisConsumer, String key, String... value) {
        this.redisProducer = redisConsumer;
        this.value = value;
        this.key = key;
    }
}
